
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>员工</title>
    <%@include file="/static/js/common.jsp"%>
    <script>
        jQuery.ajaxSettings.traditional = true
        $(function () {
            //渲染表格数据
            $('#employee_dg').datagrid({
                url:'/accountBook/query.do',
                fitColumns:true,
                width:'98%',
                height:'95%',
                pagination:true,
                toolbar:"#employee_tb",
                rownumbers:true,
                columns:[[
                    {field:'sn',title:'类型',width:100,formatter: function (value, row, index) {
                            console.log(value);
                            if (value) {
                                return '入账';
                            } else {
                                return '出账';
                            }
                        }},
                    {field:'billId',title:'订单编号',width:100},
                    {field:'inputTime',title:'录入时间',width:100},
                    {field:'amount',title:'金额(入账/出账)',width:100}

                ]]
            });
        })


        /*刷新*/
        function reloadwin() {
            $('#employee_dg').datagrid("reload");

        }
        /*高级查询*/
        function query () {

            var beginTime=  $("#beginTime").val();

            var endTime=  $("#endTime").val();
            $('#employee_dg').datagrid("load",{"beginTime":beginTime,"endTime":endTime});
        }



    </script>
</head>
<body>
录入时间:<input    type= "text" class= "easyui-datebox" id="beginTime"> </input>
~<input    type= "text" class= "easyui-datebox"  id="endTime"> </input>
<a class="easyui-linkbutton" onclick="query()"  data-options="iconCls:'icon-search',text:'查询'"></a>


<table id="employee_dg"></table>
<div id="employee_tb" >


    <a class="easyui-linkbutton" onclick="reloadwin()" data-options="iconCls:'icon-reload',text:'刷新'"></a>

</div>


</body>
</html>
